<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends Action {
    public function index(){
    	
    	$Img = M('index_module_img');
    	$Goods = M('goods');
    	//喵星人星球7个模块
    	$Module10 = $Img->where('mid = 10')->order('id Desc')->find();
    	$goods10 = $Goods->where('id='.$Module10['gid'])->find();
    	$this->assign('module10', $Module10);
    	$this->assign('goods10', $goods10);
    	
    	$Module11 = $Img->where('mid = 11')->order('id Desc')->limit('0,3')->select();
    	$this->assign('module11', $Module11);
    	
    	$Module12 = $Img->where('mid = 12')->order('id Desc')->find();
    	$goods12 = $Goods->where('id='.$Module12['gid'])->find();
    	$this->assign('goods12', $goods12);
    	
    	
    	$Module13 = $Img->where('mid = 13')->order('id Desc')->find();
    	$goods13 = $Goods->where('id='.$Module13['gid'])->find();
    	$this->assign('goods13', $goods13);
	    	

    	$Module14 = $Img->where('mid = 14')->order('id Desc')->find();
    	$goods14 = $Goods->where('id='.$Module14['gid'])->find();
    	$this->assign('goods14', $goods14);
    	
    	$Module15 = $Img->where('mid = 15')->order('id Desc')->find();
    	$goods15 = $Goods->where('id='.$Module15['gid'])->find();
    	$this->assign('goods15', $goods15);
    	
    	$Module16 = $Img->where('mid = 16')->order('id Desc')->find();
    	$goods16 = $Goods->where('id='.$Module16['gid'])->find();
    	$this->assign('goods16', $goods16);
    	
    	
    	$this->assign('module12', $Module12);
    	$this->assign('module13', $Module13);
    	$this->assign('module14', $Module14);
    	$this->assign('module15', $Module15);
    	$this->assign('module16', $Module16);
    	
    	//汪星人星球5个模块
    	$Module20 = $Img->where('mid = 20')->order('id Desc')->limit('0,3')->select();
    	$this->assign('module20', $Module20);
    	
    	$Module21 = $Img->where('mid = 21')->order('id Desc')->find();
    	$this->assign('module21', $Module21);
    	
    	$Module22 = $Img->where('mid = 22')->order('id Desc')->find();
    	$goods22 = $Goods->where('id='.$Module22['gid'])->find();
    	$this->assign('goods22', $goods22);
    	$this->assign('module22', $Module22);
    	
    	$Module23 = $Img->where('mid = 23')->order('id Desc')->find();
    	$goods23 = $Goods->where('id='.$Module23['gid'])->find();
    	$this->assign('goods23', $goods23);
    	$this->assign('module23', $Module23);
    	
    	$Module24 = $Img->where('mid = 24')->order('id Desc')->find();
    	$goods24 = $Goods->where('id='.$Module24['gid'])->find();
    	$this->assign('goods24', $goods24);
    	$this->assign('module24', $Module24);
    	
    	//我们的书五个模块
    	$Module30 = $Img->where('mid = 30')->order('id Desc')->find();
    	$goods30 = $Goods->where('id='.$Module30['gid'])->find();
    	$this->assign('goods30', $goods30);
    	$this->assign('module30', $Module30);
    	
    	$Module31 = $Img->where('mid = 31')->order('id Desc')->find();
    	$goods31 = $Goods->where('id='.$Module31['gid'])->find();
    	$this->assign('goods31', $goods31);
    	$this->assign('module31', $Module31);
    	
    	$Module32 = $Img->where('mid = 32')->order('id Desc')->find();
    	$goods32 = $Goods->where('id='.$Module32['gid'])->find();
    	$this->assign('goods32', $goods32);
    	$this->assign('module32', $Module32);
    	
    	$Module33 = $Img->where('mid = 33')->order('id Desc')->find();
    	$goods33 = $Goods->where('id='.$Module33['gid'])->find();
    	$this->assign('goods33', $goods33);
    	$this->assign('module33', $Module33);
	
	$Module34 = $Img->where('mid = 34')->order('id Desc')->find();
    	$goods34 = $Goods->where('id='.$Module34['gid'])->find();
    	$this->assign('goods34', $goods34);
    	$this->assign('module34', $Module34);
    	
	
	$this->display();
    }
}
